﻿#ifndef USERINFOCODEC_H
#define USERINFOCODEC_H

#include <qobject.h>
#include "ObjAutoInject.h"
#include <qvector.h>

#include "Device.h"

class TcpCodec;
class DeviceInfoManager;
class UserInfoCodec : public QObject,public ObjAutoInject
{
  Q_OBJECT
  enum {
    AllDevice=0
  };
private://dependency
  TcpCodec* tcpCodec=Q_NULLPTR;
  DeviceInfoManager* deviceInfoManager=Q_NULLPTR;
public:
  explicit UserInfoCodec();
  virtual ~UserInfoCodec();
signals:
public:
  void getAllDeviceFromServer();
  void decode(QByteArray data);
public://geter and seter
  TcpCodec* getTcpCodec()const;
  UserInfoCodec* setTcpCodec(TcpCodec* const tcpCodec);
  DeviceInfoManager* getDeviceInfoManager()const;
  UserInfoCodec* setDeviceInfoManager(DeviceInfoManager* const deviceInfoManager);
public:
  virtual void objectAutoInjection(QHash<QString,QObject*>* objMap)override;
};

#endif // USERINFOCODEC_H
